using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;




using System.Data.SqlClient;





namespace HIS211201130薛星宇
{

 

    class myDbClass
    {

        private static readonly string connstring ="server =localhost;database=HISBOOK;user='sa';pwd='123'";
        public static SqlConnection coon = new SqlConnection(connstring);

        public static void opendatabase()
        {
            try
            {
                coon.Open();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message.ToString());

            }
        }



    }
}
